package tech.aistar;

import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.net.InetAddress;
import java.net.UnknownHostException;


@MapperScan(basePackages = "tech.aistar.mapper")
@SpringBootApplication
@EnableTransactionManagement
public class MusicYyApplication {
    public final static Logger log = LoggerFactory.getLogger(MusicYyApplication.class);
    public static void main(String[] args) throws UnknownHostException {
        ConfigurableApplicationContext application =SpringApplication.run(MusicYyApplication.class, args);
        Environment env = application.getEnvironment();
        String ip = InetAddress.getLocalHost().getHostAddress();
        String port = env.getProperty("server.port");
        String path = env.getProperty("server.servlet.context-path");

        log.info("\n--------------------------听歌识曲 认准音悦--------------------------------\n\t" +
                "程序启动成功! 努力哟！！\n\t" +
                "音悦首页: \t\thttp://localhost:8088/dev/views/slx/index.html"+"\n\t" +
                "音悦登录地址: \thttp://localhost:8088/dev/views/slx/login.html"+"\n\t" +
                "----------------------------------------------------------");

    }

}
